Automatic links
Frontier does perform a little more automatic HTML for you, which you can prevent if you don't want it. To see an example, go into myFirstSite.default and add at the end this line:
<p>Comments? Write to webmaster@www.mySite.com</p>
View this in the browser. Notice that, in the browser, "webmaster@www.mySite.com" is a link! In fact, it's a mailto link, linking to webmaster@www.mySite.com. Frontier interprets as a mailto link any expression not inside quotes that is made up of certain basic alphanumeric characters and contains an "@" sign.
If you don't want an email address interpreted in this way, or if you want to use an "@" in some other way, you simply "escape" the "@" by putting a backslash in front of it.
Try it: change the last line to:
<p>Comments? Write to webmaster\@www.mySite.com</p>
See the backslash? View this in the browser; the backslash is gone, but the email address is no longer a link.
Frontier does the same sort of thing with URLs that contain "//", where this time the "//" is the trigger for the change, and can be overridden by putting a backslash before it. Make the last two lines of myFirstSite.default look like this:
<p>Comments? Write to webmaster@www.mySite.com<br> And don't forget to check out http://www.scripting.com!</p>
View this in the browser. Both expressions are turned into links. But if you say:
And don't forget to check out http:\//www.scripting.com!</p>
then when you view it in the browser, the backslash is gone, and it isn't a link.
Besides preventing one or both of these expression types from being turned into links by the backslash escapement method, you can also turn the whole mechanism off with the #activeURLs directive; set it to "false" to turn off the mechanism.
Note: Since the backslash is the "escape" character, it is never rendered literally. If you need a literal backslash to appear in the browser, you have to type two backslashes in a row in the Frontier text. Also, it does no harm to put a backslash character before a character that has no special meaning; the backslash will just be removed during rendering, with no further effect.
Character translation
Frontier does one more piece of basic HTML for you. To see it, first go into user.html.prefs and make sure that "charset" is set to "iso-8859-1" and "isoFilter" is set to "true" (all without the quotes -- you can create these if they don't exist already).
Now, in myFirstSite.default, change the phrase "very easy" to "très simple" (to get e with an accent grave, you type Alt-0233. On the Mac it's option-backquote, then e). Preview the page.
It looks fine; that is, you see "très simple" there as well. But as you know if you have some experience with these things, that's not trivial, because in order to get computers from all platforms to see the same thing with their Web browsers over the Internet, special characters have to be specially encoded. Frontier has done this, replacing our "très" with:
très
So, you can type using your Windows or Mac character set; Frontier will render in such a way as to make the result legible to all platforms (to the extent that this is possible).
Note: this change you cannot prevent by putting a phrase in quotes or by preceding a special character with a backslash. You can either set #isoFilter to "false" with a directive, or you can use other advanced techniques we won't discuss here to override the conversion for specific characters.
Where to edit HTML
Frontier does generate some more HTML, which we'll learn about. Frontier even has an HTML menu that lets you insert and edit HTML tags.
Unlike a WYSIWYG-to-HTML converter such as PageMill or Visual Page, Frontier deals with literal text, not character styles. You can turn a word bold in a wp text, but Frontier will not put <b> and </b> tags around that word when it renders it.
Frontier provides shortcuts for manipulating HTML tags; for instance, you can select a word in a Frontier wp text and then surround it magically with <b> and </b> tags. See the HTML menu, which turns Frontier into a powerful HTML text editor.
But Frontier is not a WYSIWYG HTML editor.
If you think about it for a moment, this is a very sensible way for Frontier to work. Frontier applies itself to what it is peculiarly good at; it is pointless for it to reinvent wheels that are superbly implemented elsewhere.
Moreover, you, the user, thereby gain maximum flexibility. Sometimes I create HTML by working in Nisus and using its tag-insertion macros to make HTML tags directly. Sometimes I create HTML by working in Visual Page and using its WYSIWYG features. Either way, I can then just copy the finished HTML into Frontier.
Cutting and pasting is so easy that it is no trouble (I find) to create your HTML in another program and then store it in Frontier. What's more, when you learn about Frontier scripting you can often figure out a way to automate communication between Frontier and your favorite HTML editor.
.dmg/Shareware World/Info/For Developers/Frontier 5.1.2 Trial/Website Tutorial/images/previous.gif)
|